package edu.yngsxy.wkstudy.core.sys.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import edu.yngsxy.wkstudy.core.model.entity.WkBaseEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;
import jakarta.validation.constraints.*;
import io.swagger.v3.oas.annotations.media.Schema;
/**
 * <p>
 * 试卷表
 * </p>
 *
 * @author group 2
 * @since 2025-09-09
 */
@Getter
@Setter
@ToString
@TableName("exampaper")
@Accessors(chain = true)
@Schema(description = "试卷表")
public class Exampaper extends WkBaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 试卷ID
     */
    @TableField(value = "exam_paper_id")
    @Schema(title = "试卷ID", description = "试卷ID", requiredMode =Schema.RequiredMode.REQUIRED)
    @NotNull(message = "试卷ID不能为空")
    private Integer examPaperId;

    /**
     * 试卷名称
     */
    @TableField("exam_name")
    @Schema(title = "试卷名称", description = "试卷名称", requiredMode =Schema.RequiredMode.NOT_REQUIRED)
    @Size(max = 200, message = "试卷名称长度不能超过200个字符")
    private String examName;

    /**
     * 创建者ID（外键，关联User，教师/管理员）
     */
    @TableField("creator_id")
    @Schema(title = "创建者ID（外键，关联User，教师/管理员）", description = "创建者ID（外键，关联User，教师/管理员）", requiredMode =Schema.RequiredMode.NOT_REQUIRED)
    private Integer creatorId;

    /**
     * 创建时间
     */
    @TableField("create_time")
    @Schema(title = "创建时间", description = "创建时间", requiredMode =Schema.RequiredMode.REQUIRED)
    @NotNull(message = "创建时间不能为空")
    private LocalDateTime createTime;
}
